package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 客户子系统基础参数表
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tt_customer_basedata")
public class CustomerBasedataPO extends DMSBasePO<CustomerBasedataPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 基础数据ID
     */
        @TableId(value = "BASEDATA_ID", type = IdType.AUTO)
        private Integer basedataId;
    /**
     * 经销商代码
     */
    @TableField("DEALER_CODE")
    private String dealerCode;
    /**
     * 基础数据代码
     */
    @TableField("BASEDATA_CODE")
    private String basedataCode;
    /**
     * 基础数据名称
     */
    @TableField("BASEDATA_NAME")
    private String basedataName;
    /**
     * 基础数据关联ID
     */
    @TableField("BASEDATA_RELATE_ID")
    private Integer basedataRelateId;
    /**
     * 数据来源
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;
    /**
     * 是否有效
     */
    @TableField("IS_VALID")
    private Integer isValid;
    /**
     * 基础数据描述
     */
    @TableField("BASEDATA_DESCRIBE")
    private String basedataDescribe;
    /**
     * 基础数据类型
     */
    @TableField("BASEDATA_TYPE")
    private Integer basedataType;
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public CustomerBasedataPO() {
        super();
    }


    public Integer getBasedataId() {
        return basedataId;
    }

    public void setBasedataId(Integer basedataId) {
        this.basedataId = basedataId;
    }

    public String getDealerCode() {
        return dealerCode;
    }

    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }

    public String getBasedataCode() {
        return basedataCode;
    }

    public void setBasedataCode(String basedataCode) {
        this.basedataCode = basedataCode;
    }

    public String getBasedataName() {
        return basedataName;
    }

    public void setBasedataName(String basedataName) {
        this.basedataName = basedataName;
    }

    public Integer getBasedataRelateId() {
        return basedataRelateId;
    }

    public void setBasedataRelateId(Integer basedataRelateId) {
        this.basedataRelateId = basedataRelateId;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public String getBasedataDescribe() {
        return basedataDescribe;
    }

    public void setBasedataDescribe(String basedataDescribe) {
        this.basedataDescribe = basedataDescribe;
    }

    public Integer getBasedataType() {
        return basedataType;
    }

    public void setBasedataType(Integer basedataType) {
        this.basedataType = basedataType;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.basedataId;
    }

    @Override
    public String toString() {
        return "CustomerBasedataPO{" +
        "basedataId=" + basedataId +
        ", dealerCode=" + dealerCode +
        ", basedataCode=" + basedataCode +
        ", basedataName=" + basedataName +
        ", basedataRelateId=" + basedataRelateId +
        ", dataSources=" + dataSources +
        ", isValid=" + isValid +
        ", basedataDescribe=" + basedataDescribe +
        ", basedataType=" + basedataType +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "basedataId");
    }


}
